﻿using System;
using System.Data.Common;
using System.Data.SqlClient;

using SBPweb.Data.Generic;

#if SQL2005
namespace SBPweb.Data.SQL2005
{
    /// <summary>
    /// This interface provides the signature for the
    /// class that converts a given IdentityObject into
    /// a DbCommand to do a search for the corresponding
    /// result set.
    /// </summary>
    /// <typeparam name="TIdentityObject">Type that identifies the
    /// items to search for.</typeparam>
	public interface ISelectionFactory<TIdentityObject> : IDbToBusinessEntityNameMapper
    {
		/// <summary>
		/// This method creates a select command by the given IdentityObject and SqlDatabase
		/// </summary>
		/// <param name="db">SqlDatabase db</param>
		/// <param name="idObject">TIdentityObject idObject</param>
		/// <returns>SqlCommand</returns>
		SqlCommand ConstructSelectCommand(SqlDatabase db, TIdentityObject idObject);
    }
}
#endif